<?php
$this->breadcrumbs=array(
	'App Categories'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List AppCategories', 'url'=>array('index')),
	array('label'=>'Create AppCategories', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('app-categories-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>APP 类别 管理</h1>

<?php echo CHtml::link('查找','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display: none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div>
<!-- search-form -->

<?php echo CHtml::link('添加',array('create')); ?>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'app-categories-grid',
	'dataProvider'=>$model->search(),
	'columns'=>array(
		'category_id',
		'category_code',
		'category_name',
		'platform_type',
		'app_type',
		'description',
		'apps_count',
// 		'sort_index',
		array (
			'class' => 'CButtonColumn',
			'template' => '{app} {view} {update} {delete}',
			'buttons' => array (
					'app' => array (
							'label' => 'app',
							// 'imageUrl'=>Yii::app()->request->baseUrl.'/images/icons/coins.png',
							'url' => 'Yii::app()->createUrl("apps/index", array("category_code"=>$data->category_code, ))' 
					) 
			),
			'htmlOptions' => array (
					'style' => 'width:100px' 
			),
		),),
)); ?>
